<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:p='http://primefaces.org/ui'
      xmlns:h='http://java.sun.com/jsf/html'
      xmlns:fn='http://java.sun.com/jsp/jstl/functions'
      xmlns:cc='http://java.sun.com/jsf/composite' style='color: inherit'>

<cc:interface>

<cc:attribute name='id'/>

<cc:attribute name='b'/>

<cc:attribute name='p'/>

<cc:attribute name='z'/>

<cc:attribute name='t'    default='#{cc.attrs.p}'/>

<cc:attribute name='x'    default='s'/>

<cc:attribute name='wT'   default='65'/>

<cc:attribute name='w'    default='250px'/>

<cc:attribute name='maxL' default='#{cc.attrs.b.entityLsProperty[fn:toLowerCase(cc.attrs.p)][2]}'/>

<cc:attribute name='read' default='#{cc.attrs.b.isRead}'/>

<cc:attribute name='onkeydown'/>

<cc:attribute name='onkeypress'/>

</cc:interface>


<cc:implementation>

<h:panelGrid columns='2' cellpadding='0' cellspacing='0' styleClass='align-text-bottom'>

<h:panelGrid columns='1' cellpadding='0' cellspacing='1' width='#{cc.attrs.wT}' styleClass="#{cc.attrs.read? '':'ui-state-default xFd'}"><span title='#{cc.attrs.maxL}'>#{cc.attrs.t}</span></h:panelGrid>


<h:panelGroup id='inputCode'>

<p:inputText  value='#{cc.attrs.b.entity[fn:toLowerCase(cc.attrs.p)]}' rendered='#{!cc.attrs.read and cc.attrs.z == null}' style='width: #{cc.attrs.w}' styleClass='xIn' maxlength='#{cc.attrs.maxL}' onkeydown='#{cc.attrs.onkeydown}' onkeypress='#{cc.attrs.onkeypress}'/>

<h:outputText value='#{cc.attrs.b.entity[fn:toLowerCase(cc.attrs.p)]}' rendered='#{ cc.attrs.read and cc.attrs.z == null}' style='width: #{cc.attrs.w}' styleClass='xIn'/>


<p:inputText  value='#{cc.attrs.b.entity[fn:toLowerCase(cc.attrs.p)][fn:toLowerCase(cc.attrs.z)]}' rendered='#{!cc.attrs.read and cc.attrs.z != null}' style='width: #{cc.attrs.w}' styleClass='xIn' maxlength='#{cc.attrs.maxL}' onkeydown='#{cc.attrs.onkeydown}' onkeypress='#{cc.attrs.onkeypress}'/>

<h:outputText value='#{cc.attrs.b.entity[fn:toLowerCase(cc.attrs.p)][fn:toLowerCase(cc.attrs.z)]}' rendered='#{ cc.attrs.read and cc.attrs.z != null}' style='width: #{cc.attrs.w}' styleClass='xIn'/>

</h:panelGroup>

</h:panelGrid>

</cc:implementation>

</html>